package com.jzr.bedside.ui.adapter

import android.graphics.Color
import android.view.View
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jzr.bedside.R
import com.jzr.bedside.bean.BedInfoBean.DataBean.CareLabelListBean
import com.jzr.bedside.bean.BedInfoBean


class CareLabelAdapter(data: MutableList<BedInfoBean.DataBean.CareLabelListBean>?) :
    BaseQuickAdapter<BedInfoBean.DataBean.CareLabelListBean, BaseViewHolder>(
        R.layout.item_carelabel,
        data
    ) {




    override fun convert(helper: BaseViewHolder?, item: BedInfoBean.DataBean.CareLabelListBean?) {
        helper?.setText(R.id.tvCarelable, item?.labelName)
        val tvName = helper!!.getView<TextView>(R.id.tvCarelable)
        tvName.setTextColor(Color.parseColor(item?.fontColor))
        helper?.getView<View>(R.id.item_doctor_advice)
            .setBackgroundColor(Color.parseColor(item?.bgColor))
    }


}